/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package fhedu;

import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.GameCanvas;

/**
 *
 * @author Nishino
 */
class CellList extends GameCanvas {
    int x=0,y=0,x1=0,y1=0;
    int w,h,w1,h1=0;
    CellList(){
        super(false);
    }
    void CellList(Graphics g,int x1,int y1){
        x=x1;y=y1;
        g.setColor(255,0,0);
        g.drawRect(x, y, 220, 20);
        flushGraphics();
    }
    void CellPage(Graphics g, int x1, int y1)
    {
        x=x1;y=y1=280;
        g.setColor(255,0,0);
        g.drawRect(x, y,15, 15);
        flushGraphics();      
    }
   void CellO(Graphics g,int x1,int y1,int w1,int h1){
       x=x1;y=y1;
       w=w1;h=h1;
       g.setColor(255,0,0);
       g.drawRect(x,y,w,h);
   }
   void FocusCell(Graphics g){
       g.setColor(0,0,255);
       g.drawRect(x,y,w,h);
       g.drawRect(x-1, y-1, w-1, h-1);
   }
   void UnFocusCell(Graphics g){
       g.setColor(255,255,255);
       g.drawRect(x,y,w,w);
       g.drawRect(x-1, y-1, w-1, h-1);
       this.CellO(g, x, y,w,h);
   }
   void FoCus(Graphics g)
    {
        //x=2;y=106;
        g.setColor(0,0,255);
        g.drawRect(x+1, y, 218, 18);
        g.drawRect(x+2, y+1, 216, 16);
    }
   void FocusPage(Graphics g)
   {
       //x=85;y=280;
       g.setColor(0,0,255);
       g.drawRect(x,y,15,15);    
   }
   void UnFocusPage(Graphics g){
       //x=85;y=280;
       g.setColor(255,255,255);
       g.drawRect(x,y,15,15);
       this.CellPage(g, x, y);
   }
    void UnFocus(Graphics g)
    {
        //x=10;y=106;
        g.setColor(255,255,255);
        g.drawRect(x+1, y,218, 18);
        g.drawRect(x+2, y+1, 216, 16);
        this.CellList(g, x, y);
        g.drawLine(70, 85, 70, 265);
    }
    
}
